package tmall.secondkill.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import tmall.framework.Response;
import tmall.secondkill.entity.Commodity;
import tmall.secondkill.service.CommodityService;
import tmall.secondkill.service.impl.CommodityServiceImpl;

@RestController
@RequestMapping("/tmall/secondkill/v1/commodity/")
public class CommodityController {

    @Autowired
    private CommodityServiceImpl commodityService;

    @GetMapping("{commodityId}")
    public Response get(@PathVariable(name = "commodityId") long commodityId) {
        return null;
    }

    @PostMapping
    public Response post(@RequestBody Commodity commodity) {
        return null;
    }

    @DeleteMapping("{commodityId}")
    public Response delete(@PathVariable(name = "commodityId") long commodityId) {
        return null;
    }

    @PutMapping
    public Response put(@RequestBody Commodity commodity) {
        return null;
    }
}
